package be.bonamis.umpire.domain.history;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@IdClass(UmpireGameId.class)
public class UmpireGame {

	@Id
	private long umpireId;
	@Id
	private long gameId;
	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@JoinColumn
	private FairPlayReport homeClubReport;
	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@JoinColumn
	private FairPlayReport awayClubReport;

	public UmpireGame() {
	}

}
